package com.jiangjiang.eshop.promotion.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jiangjiang.eshop.promotion.domain.PromotionActivityEntity;
import com.jiangjiang.eshop.promotion.domain.PromotionActivityGoodsRelationEntity;
import com.jiangjiang.eshop.promotion.dto.PromotionActivityDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

/**
 * @ClassName PromotionActivityConvert
 * @Description TODO
 * @Author jhw
 * @Date 2021/7/15 11:09
 * @Version 1.0
 **/
@Mapper(componentModel = "spring")
public interface PromotionActivityConvert {

    PromotionActivityDTO convertEntity2DTO(PromotionActivityEntity entity);

    PromotionActivityEntity convertDTO2Entity( PromotionActivityDTO dto);

    List<PromotionActivityDTO> convertEntities2DTOList(List<PromotionActivityEntity> entities);

    Page<PromotionActivityDTO> convertPage(Page<PromotionActivityEntity> page);
}
